module.exports = app =>{
    const {router,controller} = app
    var adminauth = app.middleware.adminauth()
    router.get('/admin/index',controller.admin.main.index)
    router.post('/admin/checkLogin',controller.admin.main.checkLogin)   //检查用户名和密码
    router.get('/admin/getTypeInfo', controller.admin.main.getTypeInfo)  //获取文章类别信息
    router.post('/admin/addArticle', controller.admin.main.addArticle)   //检查用户名和密码
    router.post('/admin/updateArticle', controller.admin.main.updateArticle) //更新文章
    router.get('/admin/getArticleList', controller.admin.main.getArticleList) //获得文章列表
    router.get('/admin/delArticle/:id', controller.admin.main.delArticle)       //删除文章
    router.get('/admin/getArticleById/:id', controller.admin.main.getArticleById) //获取文章id

  }